
dict1 = {'a': 10, 'b': 8, 'd': '7'}

dict2 = {'d': 6, 'c': 4}


newDict = {}

for (key, value) in dict1.items():
    print(key, ':' ,value)
    newDict[key] = value

for (key2, value2) in dict2.items():
    if key2 in newDict.keys():
        new_dict_value = newDict[key2]
        bigger = max(value2, int(new_dict_value))
        newDict[key2] = bigger
    else:
        newDict[key2] = value2

print(newDict)
